#include <stdio.h>

int sum(int begin, int end) {
    int sum = 0;
    for (int i = begin; i <= end; i++)
        sum += i;
    return sum;
}

int main() {
    printf("Sum from 1 to 10 is %d\n", sum(1, 10));
    printf("Sum from 20 to 30 is %d\n", sum(20, 30));
    printf("Sum from 35 to 45 is %d\n", sum(35, 45));
    return 0;
}
